package com.HelpDog.src;

import android.app.Activity;
import android.hardware.Camera;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;

public class CameraActivity extends Activity{
	
	Camera mCamera;
	CameraPreview mPreview;
	TextView tv, tv2;
	LinearLayout rl;
	
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		
		mPreview = new CameraPreview(this);
		setContentView(mPreview);
		
		//Log Text View
		rl = new LinearLayout(this);
		LayoutParams rlParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 
		LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
		LayoutParams params2 = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
		rl.setLayoutParams(rlParams);
		tv = new TextView(this);
		tv.setText("Detected Yellow -> 0");
		tv2 = new TextView(this);
		tv2.setText("yCount -> 0");
		params2.topMargin = 50;
		rl.addView(tv, params);
		rl.addView(tv2, params2);
		addContentView(rl, rlParams);
		//Log Text View End
	}
	
	public void detectedYellow(String str) {
		tv.setText(str);
	}
	
	public void yCount(String str) {
		tv2.setText(str);
	}
}
